Skip to content

Conversation

@heckj
Copy link
Member

@heckj heckj commented Jan 2, 2026

Updating the traits documentation to touch on missed pieces and revise to conform a little better to developer content guidelines.

Motivation:

  • making it clear that traits are additive across a build tree when requested
  • touching on expected constraints when using common trait names that may impact multiple dependencies.

Modifications:

Grammar revisions and added sentences for clarity.

@heckj heckj self-assigned this Jan 2, 2026
@heckj
Copy link
Member Author

heckj commented Jan 2, 2026

@swift-ci please test

heckj added 3 commits January 13, 2026 09:44
… on a package with a trait as a new section. Switched up title to use a gerund phrase and the section headings to be imperative, and consistently sentence cased.
Copy link
Contributor

@bripeticca bripeticca left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great! 😄

Enabled traits are exposed as conditional blocks (for example, `#if YourTrait`) that you can use to conditionally enable imports or different compilation paths in code.

## Overview
Don't use the trait names `default` or `defaults` (regardless of capitalization) to avoid confusion with the default traits that a package defines.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This sounds less strict than before. We do throw an error if one tries to use those names.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants